package com.dlc.shop.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dlc.shop.bean.dto.BrandShopDTO;
import com.dlc.shop.bean.dto.BrandSigningDTO;
import com.dlc.shop.bean.model.BrandShop;
import com.dlc.shop.bean.vo.BrandShopVO;
import com.dlc.shop.bean.vo.BrandSigningVO;
import com.dlc.shop.common.util.PageParam;

import java.util.List;

/**
 * @Author lth
 * @Date 2021/7/28 11:26
 */
public interface BrandShopService extends IService<BrandShop>  {

    /**
     * 签约品牌
     * @param brandSigningDTO
     * @param shopId
     * @param isPlatform
     */
    void signingBrands(BrandSigningDTO brandSigningDTO, Long shopId, Boolean isPlatform);

    /**
     * 根据店铺id获取品牌签约信息
     * @param shopId 店铺ID
     * @param status
     * @return 品牌签约信息列表
     */
    BrandSigningVO listSigningByShopId(Long shopId, Integer status);


    /**
     * 根据店铺id批量保存品牌签约信息
     * @param brandShopList
     * @param shopId
     * @param status
     */
    void insertBatchByShopId(List<BrandShopDTO> brandShopList, Long shopId, Integer status);


    /**
     * 根据店铺id把自定义品牌更新为平台品牌
     * @param shopId
     */
    void updateCustomBrandToPlatformBrandByShopId(Long shopId);

    /**
     * 根据店铺id与状态更改签约状态
     * @param shopId
     * @param oldStatus
     * @param newStatus
     */
    void changeStatusByShopIdAndStatus(Long shopId, Integer oldStatus, Integer newStatus);

    /**
     * 根据品牌id删除店铺品牌关联关系
     * @param brandId
     */
    void deleteByBrandId(Long brandId);

    /**
     * 根据店铺id分页签约的品牌列表
     * @param page
     * @param brandShop
     * @return
     */
    IPage<BrandShopVO> pageSigningByShopId(PageParam<BrandShopVO> page, BrandShopDTO brandShop);

    /**
     * 根据店铺id与品牌id删除品牌签约信息
     * @param shopId
     * @param brandId
     */
    void deleteByShopIdAndBrandId(Long shopId, Long brandId);

    /**
     * 批量保存签约品牌信息
     * @param addBrandList
     * @param shopId
     * @param status
     */
    void insertBatchByBrandShopListAndShopId(List<BrandShop> addBrandList, Long shopId, Integer status);
}
